<%@page pageEncoding="utf-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>车位添加</title>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css" media="all">
    <script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/js/x-layui.js" charset="utf-8"></script>

    <script>
        layui.use(['element','layer','form'], function(){});
    </script>

</head>

<body>

<div class="x-body">
    <form action="${pageContext.request.contextPath}/parking/add" method="post"
          class="layui-form layui-form-pane" id="add">

        <div class="layui-form-item">
            <label class="layui-form-label">所属小区</label>
            <div class="layui-input-inline">
                <select name="vname">
                    <option>--请选择小区--</option>
                    <c:forEach items="${villages}" var="village">
                        <option value="${village.id}"> ${village.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">车位编号</label>
            <div class="layui-input-block">
                <input type="text" name="parkingId" autocomplete="off" placeholder="请输入车位编号，控制在160个字符以内"
                       class="layui-input" value="">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">车位名称</label>
            <div class="layui-input-block">
                <input type="text" name="parkingName" autocomplete="off" placeholder="请输入车位名称，控制在160个字符以内"
                       class="layui-input" value="">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="radio" name="state" value="1" title="闲置中" checked="checked">
                <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i>
                    <div>闲置中</div>
                </div>
                <input type="radio" name="state" value="0" title="使用中" >
                <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon layui-anim-scaleSpring"></i>
                    <div>使用中</div>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <button class="layui-btn" type="submit" lay-filter="add" lay-submit="">保存添加</button>
        </div>

    </form>
</div>

</body>
</html>